package com.youlg.mapper.Books;

import com.youlg.pojo.Books;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface BooksMapper {
    //增加
    int addBook(Books book);

    //删除
    int deleteBookById(@Param("bookId") int id);

    //更改
    int updateBook(Books books);

    //查询指定id
    Books queryBookId(@Param("bookId") int id);

    //查询全部
    @Select("select * from books")
    List<Books> queryAllBook();

    List<Books> queryBookName(@Param("bookName") String bookName);

}
